using SharpGraphT.Graph.Builder;

namespace SharpGraphT.Graph;

public class
    DefaultUndirectedWeightedGraph<TV, TE> : DefaultUndirectedGraph<TV, TE>
    where TE : class, new() {
    private static readonly long SerialVersionUid = -1008165881690129042L;

    public DefaultUndirectedWeightedGraph() : this(null, () => new TE()) { }

    public DefaultUndirectedWeightedGraph(Func<TV> vertexSupplier,
        Func<TE> edgeSupplier) : base(vertexSupplier, edgeSupplier, true) { }

    public new static GraphBuilder<TV, TE, DefaultUndirectedWeightedGraph<TV, TE>>
        CreateBuilder()  =>
        new(new DefaultUndirectedWeightedGraph<TV, TE>());

    public new static GraphBuilder<TV, TE, DefaultUndirectedWeightedGraph<TV, TE>>
        CreateBuilder(Func<TE> edgeSupplier)  =>
        new(new DefaultUndirectedWeightedGraph<TV, TE>(null, edgeSupplier));
}